<?php
$tdatadanhmucsanpham=array();
	$tdatadanhmucsanpham[".NumberOfChars"]=80; 
	$tdatadanhmucsanpham[".ShortName"]="danhmucsanpham";
	$tdatadanhmucsanpham[".OwnerID"]="";
	$tdatadanhmucsanpham[".OriginalTable"]="danhmucsanpham";


	
//	field labels
$fieldLabelsdanhmucsanpham = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsdanhmucsanpham["English"]=array();
	$fieldToolTipsdanhmucsanpham["English"]=array();
	$fieldLabelsdanhmucsanpham["English"]["tendanhmuc"] = "Tendanhmuc";
	$fieldToolTipsdanhmucsanpham["English"]["tendanhmuc"] = "";
	if (count($fieldToolTipsdanhmucsanpham["English"])){
		$tdatadanhmucsanpham[".isUseToolTips"]=true;
	}
}


	
	$tdatadanhmucsanpham[".NCSearch"]=true;

	

$tdatadanhmucsanpham[".shortTableName"] = "danhmucsanpham";
$tdatadanhmucsanpham[".nSecOptions"] = 0;
$tdatadanhmucsanpham[".recsPerRowList"] = 1;	
$tdatadanhmucsanpham[".tableGroupBy"] = "0";
$tdatadanhmucsanpham[".mainTableOwnerID"] = "";
$tdatadanhmucsanpham[".moveNext"] = 1;




$tdatadanhmucsanpham[".showAddInPopup"] = false;

$tdatadanhmucsanpham[".showEditInPopup"] = false;

$tdatadanhmucsanpham[".showViewInPopup"] = false;


$tdatadanhmucsanpham[".fieldsForRegister"] = array();

$tdatadanhmucsanpham[".listAjax"] = false;

	$tdatadanhmucsanpham[".audit"] = false;

	$tdatadanhmucsanpham[".locking"] = false;
	
$tdatadanhmucsanpham[".listIcons"] = true;
$tdatadanhmucsanpham[".edit"] = true;
$tdatadanhmucsanpham[".inlineEdit"] = true;
$tdatadanhmucsanpham[".view"] = true;

$tdatadanhmucsanpham[".exportTo"] = true;

$tdatadanhmucsanpham[".printFriendly"] = true;

$tdatadanhmucsanpham[".delete"] = true;

$tdatadanhmucsanpham[".showSimpleSearchOptions"] = false;

$tdatadanhmucsanpham[".showSearchPanel"] = true;


$tdatadanhmucsanpham[".isUseAjaxSuggest"] = true;

$tdatadanhmucsanpham[".rowHighlite"] = true;


// button handlers file names

$tdatadanhmucsanpham[".addPageEvents"] = false;

$tdatadanhmucsanpham[".arrKeyFields"][] = "tendanhmuc";

// use datepicker for search panel
$tdatadanhmucsanpham[".isUseCalendarForSearch"] = false;

// use timepicker for search panel
$tdatadanhmucsanpham[".isUseTimeForSearch"] = false;

$tdatadanhmucsanpham[".isUseiBox"] = false;


$tdatadanhmucsanpham[".useDetailsPreview"] = true;	

$tdatadanhmucsanpham[".isUseInlineAdd"] = true;

$tdatadanhmucsanpham[".isUseInlineEdit"] = true;
$tdatadanhmucsanpham[".isUseInlineJs"] = $tdatadanhmucsanpham[".isUseInlineAdd"] || $tdatadanhmucsanpham[".isUseInlineEdit"];

$tdatadanhmucsanpham[".allSearchFields"] = array();

$tdatadanhmucsanpham[".globSearchFields"][] = "tendanhmuc";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("tendanhmuc", $tdatadanhmucsanpham[".allSearchFields"]))
{
	$tdatadanhmucsanpham[".allSearchFields"][] = "tendanhmuc";	
}


$tdatadanhmucsanpham[".googleLikeFields"][] = "tendanhmuc";



$tdatadanhmucsanpham[".advSearchFields"][] = "tendanhmuc";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("tendanhmuc", $tdatadanhmucsanpham[".allSearchFields"])) 
{
	$tdatadanhmucsanpham[".allSearchFields"][] = "tendanhmuc";	
}

$tdatadanhmucsanpham[".isTableType"] = "list";


	

$tdatadanhmucsanpham[".isDisplayLoading"] = true;

$tdatadanhmucsanpham[".isResizeColumns"] = false;

	$tdatadanhmucsanpham[".subQueriesSupAccess"] = true;




$tdatadanhmucsanpham[".pageSize"] = 20;

$gstrOrderBy = "";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdatadanhmucsanpham[".strOrderBy"] = $gstrOrderBy;
	
$tdatadanhmucsanpham[".orderindexes"] = array();

$tdatadanhmucsanpham[".sqlHead"] = "SELECT tendanhmuc";
$tdatadanhmucsanpham[".sqlFrom"] = "FROM danhmucsanpham";
$tdatadanhmucsanpham[".sqlWhereExpr"] = "";
$tdatadanhmucsanpham[".sqlTail"] = "";




//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdatadanhmucsanpham[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdatadanhmucsanpham[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "tendanhmuc";
	$tdatadanhmucsanpham[".Keys"] = $tableKeys;

//	tendanhmuc
	$fdata = array();
	$fdata["strName"] = "tendanhmuc";
	$fdata["ownerTable"] = "danhmucsanpham";
		$fdata["Label"]="Tendanhmuc"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "tendanhmuc";
	
		$fdata["FullName"]= "tendanhmuc";
	
		
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=100";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatadanhmucsanpham["tendanhmuc"]=$fdata;

	
$tables_data["danhmucsanpham"]=&$tdatadanhmucsanpham;
$field_labels["danhmucsanpham"] = &$fieldLabelsdanhmucsanpham;
$fieldToolTips["danhmucsanpham"] = &$fieldToolTipsdanhmucsanpham;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["danhmucsanpham"] = array();
$dIndex = 1-1;
			$strOriginalDetailsTable="sanpham";
	$detailsTablesData["danhmucsanpham"][$dIndex] = array(
		  "dDataSourceTable"=>"sanpham"
		, "dOriginalTable"=>$strOriginalDetailsTable
		, "dShortTable"=>"sanpham"
		, "masterKeys"=>array()
		, "detailKeys"=>array()
		, "dispChildCount"=> "1"
		, "hideChild"=>"0"
		, "sqlHead"=>"SELECT sanpham.masanpham,  sanpham.tensanpham,  sanpham.hinhanh,  sanpham.gia,  sanpham.madanhmuc,  sanpham.motangangon,  sanpham.motachitiet,  sanpham.giakhuyenmai,  danhmucsanpham.tendanhmuc"	
		, "sqlFrom"=>"FROM sanpham  INNER JOIN danhmucsanpham ON danhmucsanpham.id = sanpham.madanhmuc"	
		, "sqlWhere"=>""
		, "sqlTail"=>""
		, "groupBy"=>"0"
		, "previewOnList" => 1
		, "previewOnAdd" => 0
		, "previewOnEdit" => 0
		, "previewOnView" => 0
	);	
		$detailsTablesData["danhmucsanpham"][$dIndex]["masterKeys"][]="id";
		$detailsTablesData["danhmucsanpham"][$dIndex]["detailKeys"][]="madanhmuc";


	
// tables which are master tables for current table (detail)
$masterTablesData["danhmucsanpham"] = array();

// -----------------end  prepare master-details data arrays ------------------------------//

require_once(getabspath("classes/sql.php"));










$proto87=array();
$proto87["m_strHead"] = "SELECT";
$proto87["m_strFieldList"] = "tendanhmuc";
$proto87["m_strFrom"] = "FROM danhmucsanpham";
$proto87["m_strWhere"] = "";
$proto87["m_strOrderBy"] = "";
$proto87["m_strTail"] = "";
$proto88=array();
$proto88["m_sql"] = "";
$proto88["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto88["m_column"]=$obj;
$proto88["m_contained"] = array();
$proto88["m_strCase"] = "";
$proto88["m_havingmode"] = "0";
$proto88["m_inBrackets"] = "0";
$proto88["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto88);

$proto87["m_where"] = $obj;
$proto90=array();
$proto90["m_sql"] = "";
$proto90["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto90["m_column"]=$obj;
$proto90["m_contained"] = array();
$proto90["m_strCase"] = "";
$proto90["m_havingmode"] = "0";
$proto90["m_inBrackets"] = "0";
$proto90["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto90);

$proto87["m_having"] = $obj;
$proto87["m_fieldlist"] = array();
						$proto92=array();
			$obj = new SQLField(array(
	"m_strName" => "tendanhmuc",
	"m_strTable" => "danhmucsanpham"
));

$proto92["m_expr"]=$obj;
$proto92["m_alias"] = "";
$obj = new SQLFieldListItem($proto92);

$proto87["m_fieldlist"][]=$obj;
$proto87["m_fromlist"] = array();
												$proto94=array();
$proto94["m_link"] = "SQLL_MAIN";
			$proto95=array();
$proto95["m_strName"] = "danhmucsanpham";
$proto95["m_columns"] = array();
$proto95["m_columns"][] = "id";
$proto95["m_columns"][] = "tendanhmuc";
$obj = new SQLTable($proto95);

$proto94["m_table"] = $obj;
$proto94["m_alias"] = "";
$proto96=array();
$proto96["m_sql"] = "";
$proto96["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto96["m_column"]=$obj;
$proto96["m_contained"] = array();
$proto96["m_strCase"] = "";
$proto96["m_havingmode"] = "0";
$proto96["m_inBrackets"] = "0";
$proto96["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto96);

$proto94["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto94);

$proto87["m_fromlist"][]=$obj;
$proto87["m_groupby"] = array();
$proto87["m_orderby"] = array();
$obj = new SQLQuery($proto87);

$queryData_danhmucsanpham = $obj;
$tdatadanhmucsanpham[".sqlquery"] = $queryData_danhmucsanpham;

$tableEvents["danhmucsanpham"] = new eventsBase;

?>
